mwait-idle: fine-tune IVT residency targets
authorLen Brown <len.brown@intel.com>
Wed, 2 Jul 2014 12:51:18 +0000 (14:51 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Jul 2014 12:51:18 +0000 (14:51 +0200)
commit513fc61e5d7f770e35fad502c6c8f577cd9b56f2
treeb8d565242ec304b6e0a2b6ac5ea5601b9c4de867
parentdd5bcaf7b67568744cd003ac9e07e863780bda08
mwait-idle: fine-tune IVT residency targets

Ivy Town processors have slightly different properties
than Ivy Bridge processors, particuarly as socket count grows.
Here we add dedicated tables covering 1-2 socket,
3-4 socket, and > 4 socket IVT configurations.

This reduces the frequency of deep transitions on those systems,
which can impact throughput.

Signed-off-by: Len Brown <len.brown@intel.com>
Socket count determination needs to be done differently for us: The
relevant code runs in a pre-SMP initcall, and hence can't use
cpu_to_socket() (as only the boot CPU's cpu_data[].phys_proc_id got set
up by that time). As a replacement the patch introduces
apicid_to_socket(), thus estimating the socket count based on the boot
CPU's internal topology information (if all CPUs in a system are the
same, wich ought to be the common case, this estimate will be precise).

Note that apicid_to_socket() handles Intel topology determination only
for now, as the mwait-idle driver currently only supports Intel CPUs.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/mwait-idle.c
xen/include/asm-x86/processor.h